<?php
// don't have security here, create new class in defaut module to get more security
// Just run application only.
require_once ROOT_APPLICATION_MODULES_ADMIN_MODELS.DS."MenuItem.php";
require_once ROOT_LIBRARY_UTILITY.DS."Converter.php";

class Zend_View_Helper_ShowMenu{
    public function showMenu($menu_id) {

    	$menu_item_model = new Application_Models_Menu_Item();
    	$menu_items = $menu_item_model->fetchMenuItems($menu_id);
    	
    	$str='';
    	
    	foreach($menu_items as $menu_item)
    	{
    		$str.= '<li>';
    		
    		$str.= '<a href="' . $menu_item->link . '">';
    		$str.= $menu_item->label;
    		$str.= '</a>';
    		
    		$str.= '</li>';
    	}
		
        return $str; 

    }
}